package com.nulldev.util.osAPI.hardware.cpu;

public enum VMVendor {
	NOT_VM("Not a virtual machine!", "NVM"),

	BHYVE("BHYVE VM", "bhyve bhyve "),
	KVM("KVM", "KVMKVMKVM"),
	HYPERV("HyperV", "Microsoft Hv"),
	PARAELLS("Paraells", " lrpepyh vr"),
	VMWARE("VMWare", "VMwareVMware"),
	XEN("XenVM", "XenVMMXenVMM"),

	;

	private String displayName, id;

	private VMVendor(final String displayName, final String id) {
		this.displayName = displayName;
		this.id = id;
	}

	@Override
	public String toString() {
		return this.displayName;
	}

	public String displayName() {
		return this.displayName;
	}

	public String id() {
		return this.id;
	}

	public static VMVendor get(final String env) {
		for (final VMVendor v : values()) {
			if (v.id().equals(env)) {
				return v;
			}
		}
		return NOT_VM;
	}
}
